GROOVY-11985: Static method override on trait implementer ignored whe…#2529
GROOVY-11985: Static method override on trait implementer ignored whe…#2529paulk-asert wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2529 +/- ##
==================================================
+ Coverage 68.1373% 68.1436% +0.0063%
- Complexity 32717 32722 +5
==================================================
Files 1499 1499
Lines 125162 125168 +6
Branches 22566 22568 +2
==================================================
+ Hits 85282 85294 +12
+ Misses 32388 32384 -4
+ Partials 7492 7490 -2
🚀 New features to boost your workflow:
|
|
This looks awfully familiar to the recent change to field reference. Was the dynamic marker the missing detail? Or was it more than that? |
|
I was able to try this out yesterday (internet outage) and the change is in the spot that I would expect. The difficulty I have is reasoning about and explaining to others why "this.m(x)" can be rewritten to 3 -- or more depending on how you look at it -- different forms:
I did see that between Groovy 3 and Groovy 4, the behavior was change for private static methods. Then between Groovy 4 and 5 there was a change for the "override" or "cannot be replaced by trait method" case. I'm still on the fence about allowing dynamic dispatch so the seen trait method is not the one called in all cases. |
|
@eric-milles I'll answer in the Jira issue to keep together with some other comments. |
…n called via this in trait body
✅ All tests passed ✅🏷️ Commit: 1e0b4be Learn more about TestLens at testlens.app. |
…n called via this in trait body